//
//  AVCaptureManager.h
//  SlowMotionVideoRecorder
//
//  Created by shuichi on 12/17/13.
//  Copyright (c) 2013 Shuichi Tsutsumi. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

@protocol AVCaptureManagerDelegate;

@interface AVCaptureManager : NSObject

@property (nonatomic, assign) id<AVCaptureManagerDelegate> delegate;
@property (nonatomic, readonly) BOOL isRecording;
// Video
- (id)initWithPreviewView:(UIView *)previewView;
- (void)toggleContentsGravity;
- (void)resetFormat;
- (void)switchFormatWithDesiredFPS:(CGFloat)desiredFPS;
- (void)startRecording;
- (void)stopRecording;

// Img
- (void)captureStillImage;
@end

@protocol AVCaptureManagerDelegate <NSObject>
- (void)didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL
                                      error:(NSError *)error;
// API后四条暂不用，注掉
- (void) captureManagerStillImageCaptured:(AVCaptureManager *)captureManager;
- (void) captureManager:(AVCaptureManager *)captureManager didFailWithError:(NSError *)error;
- (void) backImgInfo:(UIImage *)image;
//- (void) captureManagerRecordingBegan:(AVCaptureManager *)captureManager;
//- (void) captureManagerRecordingFinished:(AVCaptureManager *)captureManager;
//- (void) captureManagerDeviceConfigurationChanged:(AVCaptureManager *)captureManager;

@end
